package com.dhl.prototypepattern.prototype.shallowcopy;

/**
 * @title: ShallowTom
 * @Author danghailiang
 * @Date: 2022/7/28 21:16
 * @Version 1.0
 */
public class ShallowTom implements Cloneable {
    private Long id;
    private String name;

    public ShallowTom() {
    }

    public ShallowTom(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 克隆对象
     * @return
     */
    @Override
    public ShallowTom clone() throws CloneNotSupportedException {
        ShallowTom clone = (ShallowTom) super.clone();
        return clone;
    }
}
